<?php
declare(strict_types=1);

namespace App\Models;

class UserProfession extends BaseModel
{
    protected $table = "user_profession";

    protected $fillable = [
        "uid",
        "title",
        "is_show",
        "orders",
        "remark",
        "is_default"
    ];

    protected $casts = [
        "uid" => "string",
    ];

    public static function getList(): array
    {
        $items = self::query()->get(["uid", "title"]);
        $list = [];
        foreach ($items as $value) {
           $list[$value->uid] = $value->title;
        }

        return $list;
    }
}
